package net.oschina.bilbodai.common.beanutil.bean.builder;

import net.oschina.bilbodai.common.beanutil.bean.BeanInfo;
import net.oschina.bilbodai.common.beanutil.bean.code.IPropertyCodeApplier;

import java.util.List;

public class BeanInfoBuilder {
    private String srcInternalName;
    private String targetInternalName;
    private List<IPropertyCodeApplier> propertyCodeAppliers;

    public BeanInfoBuilder setSrcInternalName(String srcInternalName) {
        this.srcInternalName = srcInternalName;
        return this;
    }

    public BeanInfoBuilder setTargetInternalName(String targetInternalName) {
        this.targetInternalName = targetInternalName;
        return this;
    }

    public BeanInfoBuilder setPropertyCodeAppliers(List<IPropertyCodeApplier> propertyCodeAppliers) {
        this.propertyCodeAppliers = propertyCodeAppliers;
        return this;
    }

    public BeanInfo createBeanInfo() {
        return new BeanInfo(srcInternalName, targetInternalName, propertyCodeAppliers);
    }
}